import Cookies from 'js-cookie';

const app = {
  state: {
    sidebar: {
      opened: !+Cookies.get('sidebarStatus'),
      withoutAnimation: false
    },
    device: 'desktop',
    theme: 'default',
    livenewsChannels: Cookies.get('livenewsChannels') || '[]',
    visitedViews: [],
    cachedViews: [],
    firstPhone: '',
    reviewPhone: '',
    endPhone: '',
    language: Cookies.get('language') || 'zh',
    firstApprDetails: sessionStorage.getItem('firstApprDetails') ? JSON.parse(sessionStorage.getItem('firstApprDetails')) : {},
    reviewApprDetails: sessionStorage.getItem('reviewApprDetails') ? JSON.parse(sessionStorage.getItem('reviewApprDetails')) : {},
    endApprDetails: sessionStorage.getItem('endApprDetails') ? JSON.parse(sessionStorage.getItem('endApprDetails')) : {},
    apprAchiCountDetails: sessionStorage.getItem('apprAchiCountDetails') ? JSON.parse(sessionStorage.getItem('apprAchiCountDetails')) : {},
    custQueryDetail: sessionStorage.getItem('custQueryDetail') ? JSON.parse(sessionStorage.getItem('custQueryDetail')) : {},
    loanDetails: sessionStorage.getItem('loanDetails') ? JSON.parse(sessionStorage.getItem('loanDetails')) : {},
    editGroups: sessionStorage.getItem('editGroups') ? JSON.parse(sessionStorage.getItem('editGroups')) : {},
    collDetails: sessionStorage.getItem('collDetails') ? JSON.parse(sessionStorage.getItem('collDetails')) : {},
    expireDetails: sessionStorage.getItem('expireDetails') ? JSON.parse(sessionStorage.getItem('expireDetails')) : {},
    collQueryDetails: sessionStorage.getItem('collQueryDetails') ? JSON.parse(sessionStorage.getItem('collQueryDetails')) : {},
    extDetails: sessionStorage.getItem('extDetails') ? JSON.parse(sessionStorage.getItem('extDetails')) : {},
    reduDetails: sessionStorage.getItem('reduDetails') ? JSON.parse(sessionStorage.getItem('reduDetails')) : {},
    auditDetails: sessionStorage.getItem('auditDetails') ? JSON.parse(sessionStorage.getItem('auditDetails')) : {},
    firstApprPage: new Map(),
    reviewApprPage: new Map(),
    apprAchiCountPage: new Map(),
    apprDispPage: new Map(),
    endApprPage: new Map(),
    orderPage: new Map(),
    orderBalancePage: new Map(),
    paymentHisPage: new Map(),
    lendersPage: new Map(),
    processPage: new Map(),
    getCodePage: new Map(),
    groupPage: new Map(),
    collDispPage: new Map(),
    collAchiPage: new Map(),
    extPage: new Map(),
    collDispatchPage: new Map(),
    orderDivisionPage: new Map(),
    applyPage: new Map(),
    auditPage: new Map(),
    customPage: new Map(),
    blackPage: new Map(),
    appVerPage: new Map(),
    productManagerPage: new Map(),
    userGradeConfigPage: new Map(),
    remindersPage: new Map(),
    returnMonPage: new Map(),
    apprGroupPage: new Map(),
    apprUserPage: new Map(),
    apprTotalPage: new Map(),
    endApprGroupPage: new Map(),
    endApprUserPage: new Map(),
    endApprTotalPage: new Map(),
    remindGroupPage: new Map(),
    remindUserPage: new Map(),
    rushGroupPage: new Map(),
    rushUserPage: new Map(),
    cashloanPage: new Map(),
    hirePurchase: new Map(),
    shortMessagePage: new Map(),
    gamappPage: new Map(),
    financeReport: new Map(),
    loanDayPage: new Map(),
    loanMonthPage: new Map(),
    electricPinPage: new Map(),
    channelConfigPage: new Map(),
    urlDispatchPage: new Map(),
    adChannelPage: new Map(),
    statisticsPage: new Map(),
    RulesManagerPage: new Map(),
    ModelManagerPage: new Map(),
    StatisticListPage: new Map(),
    MessagePushPage: new Map(),
    NoticeManagerPage: new Map(),
    payChannelPage: new Map(),
    helpCenterPage: new Map(),
    capitalRecoveryPage: new Map(),
    m1addm3Page: new Map(),
    dpdReportPage: new Map(),
    loanPlanReportPage: new Map(),
    overdueDailyPage: new Map(),
    custVolumeDailyPage: new Map(),
    custVolumeMonthPage: new Map(),
    overdueCustomerListPage: new Map(),
    inOutReminderPage: new Map(),
    tripCallRecordPage: new Map(),
    smsSendRecordPage: new Map(),
    smsSendGroupPage: new Map(),
    EfficiencyApprPage: new Map(),
    realTimeDataPage: new Map(),
    NotDialedPage: new Map(),
    DialRecordPage: new Map(),
    ElecNotDialedPage: new Map(),
    ElecDialRecordPage: new Map(),
    ElectricGroupPage: new Map(),
    ElecSalesmanPage: new Map(),
    ExtendStatementPage: new Map(),
    CollStatisReportPage: new Map(),
    FinAccountReportPage: new Map(),
    DownloadPackagePage: new Map(),
    RefuseRatePage: new Map(),
    userGroup: sessionStorage.getItem('userGroup') ? JSON.parse(sessionStorage.getItem('userGroup')) : false,
    getReportDefine: sessionStorage.getItem('getReportDefine') ? JSON.parse(sessionStorage.getItem('getReportDefine')) : []
  },
  mutations: {
    TOGGLE_SIDEBAR: state => {
      if (state.sidebar.opened) {
        Cookies.set('sidebarStatus', 1);
      } else {
        Cookies.set('sidebarStatus', 0);
      }
      state.sidebar.opened = !state.sidebar.opened;
    },
    CLOSE_SIDEBAR: (state, withoutAnimation) => {
      Cookies.set('sidebarStatus', 1)
      state.sidebar.opened = false
      state.sidebar.withoutAnimation = withoutAnimation
    },
    TOGGLE_DEVICE: (state, device) => {
      state.device = device
    },
    ADD_VISITED_VIEWS: (state, view) => {
      if (state.visitedViews.some(v => v.path === view.path)) return
      state.visitedViews.push({ name: view.name, title: view.meta.title, path: view.path })
      state.cachedViews.push(view.name)
    },
    DEL_VISITED_VIEWS: (state, view) => {
      for (const [i, v] of state.visitedViews.entries()) {
        if (v.path === view.path) {
          state.visitedViews.splice(i, 1)
          break
        }
      }
      for (const i of state.cachedViews) {
        if (i === view.name) {
          const index = state.cachedViews.indexOf(i)
          state.cachedViews.splice(index, 1)
          break
        }
      }
    },
    SET_LANGUAGE: (state, language) => {
      state.language = language
      Cookies.set('language', language)
    },
    SET_FIRSTAPPRDETAILS: (state, data) => {
      state.firstApprDetails = data
      sessionStorage.setItem('firstApprDetails', JSON.stringify(data));
    },
    SET_REVIEWAPPRDETAILS: (state, data) => {
      state.reviewApprDetails = data
      sessionStorage.setItem('reviewApprDetails', JSON.stringify(data));
    },
    SET_ENDAPPRDETAILS: (state, data) => {
      state.endApprDetails = data
      sessionStorage.setItem('endApprDetails', JSON.stringify(data));
    },
    SET_APPRACHICOUNTDETAILS: (state, data) => {
      state.apprAchiCountDetails = data
      sessionStorage.setItem('apprAchiCountDetails', JSON.stringify(data));
    },
    SET_CUSTQUERYDETAIL: (state, data) => {
      state.custQueryDetail = data
      sessionStorage.setItem('custQueryDetail', JSON.stringify(data));
    },
    SET_LOANDETAIL: (state, data) => {
      state.loanDetails = data
      sessionStorage.setItem('loanDetails', JSON.stringify(data));
    },
    SET_EDITGROUP: (state, data) => {
      state.editGroups = data
      sessionStorage.setItem('editGroups', JSON.stringify(data));
    },
    SET_COLLDETAIL: (state, data) => {
      state.collDetails = data
      sessionStorage.setItem('collDetails', JSON.stringify(data));
    },
    SET_EXPIREDETAIL: (state, data) => {
      state.expireDetails = data
      sessionStorage.setItem('expireDetails', JSON.stringify(data));
    },
    SET_COLLQUERYDETAIL: (state, data) => {
      state.collQueryDetails = data
      sessionStorage.setItem('collQueryDetails', JSON.stringify(data));
    },
    SET_EXTDETAIL: (state, data) => {
      state.extDetails = data
      sessionStorage.setItem('extDetails', JSON.stringify(data));
    },
    SET_REDUDETAIL: (state, data) => {
      state.reduDetails = data
      sessionStorage.setItem('reduDetails', JSON.stringify(data));
    },
    SET_AUDITDETAIL: (state, data) => {
      state.auditDetails = data
      sessionStorage.setItem('auditDetails', JSON.stringify(data));
    },
    SAVE_FIRSTAPPR_PAGE: (state, { path, listQuery }) => {
      state.firstApprPage.set(path, listQuery);
    },
    SAVE_REVIEW_APPR_PAGE: (state, { path, listQuery }) => {
      state.reviewApprPage.set(path, listQuery);
    },
    SAVE_APPR_ACHI_COUNT_PAGE: (state, { path, listQuery }) => {
      state.apprAchiCountPage.set(path, listQuery);
    },
    SAVE_APPR_DISP_PAGE: (state, { path, listQuery }) => {
      state.apprDispPage.set(path, listQuery);
    },
    SAVE_END_APPR_PAGE:(state, { path, listQuery }) => {
      state.endApprPage.set(path, listQuery);
    },
    SAVE_ORDER_PAGE: (state, { path, listQuery }) => {
      state.orderPage.set(path, listQuery);
    },
    SAVE_ORDER_BANLANCE_PAGE: (state, { path, listQuery }) => {
      state.orderBalancePage.set(path, listQuery);
    },
    SAVE_PAYMENT_HIS_PAGE: (state, { path, listQuery }) => {
      state.paymentHisPage.set(path, listQuery);
    },
    SAVE_LENDERS_PAGE: (state, { path, listQuery }) => {
      state.lendersPage.set(path, listQuery);
    },
    SAVE_PROCESS_PAGE: (state, { path, listQuery }) => {
      state.processPage.set(path, listQuery);
    },
    SAVE_GETCODE_PAGE: (state, { path, listQuery }) => {
      state.getCodePage.set(path, listQuery);
    },
    SAVE_GROUP_PAGE: (state, { path, listQuery }) => {
      state.groupPage.set(path, listQuery);
    },
    SAVE_COLL_DISP_PAGE: (state, { path, listQuery }) => {
      state.collDispPage.set(path, listQuery);
    },
    SAVE_COLL_ACHI_PAGE: (state, { path, listQuery }) => {
      state.collAchiPage.set(path, listQuery);
    },
    SAVE_EXT_PAGE: (state, { path, listQuery }) => {
      state.extPage.set(path, listQuery);
    },
    SAVE_COLL_DISPATCH_PAGE: (state, { path, listQuery }) => {
      state.collDispatchPage.set(path, listQuery);
    },
    SAVE_ORDER_DIVISION_PAGE: (state, { path, listQuery }) => {
      state.orderDivisionPage.set(path, listQuery);
    },
    SAVE_APPLY_PAGE: (state, { path, listQuery }) => {
      state.applyPage.set(path, listQuery);
    },
    SAVE_AUDIT_PAGE: (state, { path, listQuery }) => {
      state.auditPage.set(path, listQuery);
    },
    SAVE_CUSTOM_PAGE: (state, { path, listQuery }) => {
      state.customPage.set(path, listQuery);
    },
    SAVE_BLACK_PAGE: (state, { path, listQuery }) => {
      state.blackPage.set(path, listQuery);
    },
    SAVE_APP_VER_PAGE: (state, { path, listQuery }) => {
      state.appVerPage.set(path, listQuery);
    },
    SAVE_PRODUCT_MANAGER_PAGE: (state, { path, listQuery }) => {
      state.productManagerPage.set(path, listQuery);
    },
    SAVE_USER_GRADE_CONFIG_PAGE: (state, { path, listQuery }) => {
      state.userGradeConfigPage.set(path, listQuery);
    },
    SAVE_APPR_GROUP_PAGE: (state, { path, listQuery }) => {
      state.apprGroupPage.set(path, listQuery);
    },
    SAVE_REMING_GROUP_PAGE: (state, { path, listQuery }) => {
      state.remindGroupPage.set(path, listQuery);
    },
    SAVE_RUSH_GROUP_PAGE: (state, { path, listQuery }) => {
      state.rushGroupPage.set(path, listQuery);
    },
    SAVE_RUSH_USER_PAGE: (state, { path, listQuery }) => {
      state.rushUserPage.set(path, listQuery);
    },
    SAVE_APPR_USER_PAGE: (state, { path, listQuery }) => {
      state.apprUserPage.set(path, listQuery);
    },
    SAVE_REMIND_USER_PAGE: (state, { path, listQuery }) => {
      state.remindUserPage.set(path, listQuery);
    },
    SAVE_APPR_TOTAL_PAGE: (state, { path, listQuery }) => {
      state.apprTotalPage.set(path, listQuery);
    },
    SAVE_END_APPR_GROUP_PAGE: (state, { path, listQuery }) => {
      state.endApprGroupPage.set(path, listQuery);
    },
    SAVE_END_APPR_USER_PAGE: (state, { path, listQuery }) => {
      state.endApprUserPage.set(path, listQuery);
    },
    SAVE_END_APPR_TOTAL_PAGE: (state, { path, listQuery }) => {
      state.endApprTotalPage.set(path, listQuery);
    },
    SAVE_REMINDERS_PAGE: (state, { path, listQuery }) => {
      state.remindersPage.set(path, listQuery);
    },
    SAVE_RETURN_MON_PAGE: (state, { path, listQuery }) => {
      state.returnMonPage.set(path, listQuery);
    },
    SAVE_CASHLOAN_PAGE: (state, { path, listQuery }) => {
      state.cashloanPage.set(path, listQuery);
    },
    SAVE_HIRE_PURCHASE: (state, { path, listQuery }) => {
      state.hirePurchase.set(path, listQuery);
    },
    SAVE_SHORT_MESSAGE_PAGE: (state, { path, listQuery }) => {
      state.shortMessagePage.set(path, listQuery);
    },
    SAVE_GAM_APP_PAGE: (state, { path, listQuery }) => {
      state.gamappPage.set(path, listQuery);
    },
    SAVE_FINANCE_REPORT: (state, { path, listQuery }) => {
      state.financeReport.set(path, listQuery);
    },
    SAVE_LOANDAY_PAGE: (state, { path, listQuery }) => {
      state.loanDayPage.set(path, listQuery);
    },
    SAVE_LOANMONTH_PAGE: (state, { path, listQuery }) => {
      state.loanMonthPage.set(path, listQuery);
    },
    SAVE_ELECTRICPIN_PAGE: (state, { path, listQuery }) => {
      state.electricPinPage.set(path, listQuery);
    },
    SAVE_CHANNELCONFIG_PAGE: (state, { path, listQuery }) => {
      state.channelConfigPage.set(path, listQuery);
    },
    SAVE_URLDISPATCH_PAGE: (state, { path, listQuery }) => {
      state.urlDispatchPage.set(path, listQuery);
    },
    SAVE_ADCHANNEL_PAGE: (state, { path, listQuery }) => {
      state.adChannelPage.set(path, listQuery);
    },
    SAVE_STATISTICS_PAGE: (state, { path, listQuery }) => {
      state.statisticsPage.set(path, listQuery);
    },
    SAVE_RULESMANAGER_PAGE: (state, { path, listQuery }) => {
      state.RulesManagerPage.set(path, listQuery);
    },
    SAVE_MODELMANAGER_PAGE: (state, { path, listQuery }) => {
      state.ModelManagerPage.set(path, listQuery);
    },
    SAVE_STATISTICSLIST_PAGE: (state, { path, listQuery }) => {
      state.StatisticListPage.set(path, listQuery);
    },
    SAVE_MESSAGEPUSH_PAGE: (state, { path, listQuery }) => {
      state.MessagePushPage.set(path, listQuery);
    },
    SAVE_NOTICEMANAGER_PAGE: (state, { path, listQuery }) => {
      state.NoticeManagerPage.set(path, listQuery);
    },
    SAVE_PAY_CHANNEL_PAGE: (state, { path, listQuery }) => {
      state.payChannelPage.set(path, listQuery);
    },
    SAVE_HELPCENTER_PAGE: (state, { path, listQuery }) => {
      state.helpCenterPage.set(path, listQuery);
    },
    SAVE_CAPIATLRECOVERYPAGE: (state, { path, listQuery }) => {
      state.capitalRecoveryPage.set(path, listQuery);
    },
    SAVE_M1ADDM3_PAGE: (state, { path, listQuery }) => {
      state.m1addm3Page.set(path, listQuery);
    },
    SAVE_DPD_REPORT_PAGE: (state, { path, listQuery }) => {
      state.dpdReportPage.set(path, listQuery);
    },
    SAVE_LOANPLAN_REPORT_PAGE: (state, { path, listQuery }) => {
      state.loanPlanReportPage.set(path, listQuery);
    },
    SAVE_OVERDUE_DAILY_PAGE: (state, { path, listQuery }) => {
      state.overdueDailyPage.set(path, listQuery);
    },
    SAVE_CUST_VOLUME_DAILY_PAGE: (state, { path, listQuery }) => {
      state.custVolumeDailyPage.set(path, listQuery);
    },
    SAVE_CUST_VOLUME_MONTH_PAGE: (state, { path, listQuery }) => {
      state.custVolumeMonthPage.set(path, listQuery);
    },
    SAVE_OVERDUE_CUSTOMER_LIST_PAGE: (state, { path, listQuery }) => {
      state.overdueCustomerListPage.set(path, listQuery);
    },
    SAVE_INOUT_REMINDER_PAGE: (state, { path, listQuery }) => {
      state.inOutReminderPage.set(path, listQuery);
    },
    SAVE_TRIP_CALL_RECORD_PAGE: (state, { path, listQuery }) => {
      state.tripCallRecordPage.set(path, listQuery);
    },
    SAVE_SMS_SEND_RECORD_PAGE: (state, { path, listQuery }) => {
      state.smsSendRecordPage.set(path, listQuery);
    },
    SAVE_SMS_SEND_GROUP_PAGE: (state, { path, listQuery }) => {
      state.smsSendGroupPage.set(path, listQuery);
    },
    SAVE_EFFICIENCY_APPR_PAGE: (state, { path, listQuery }) => {
      state.EfficiencyApprPage.set(path, listQuery);
    },
    SAVE_REAL_TIME_DATA_PAGE: (state, { path, listQuery }) => {
      state.realTimeDataPage.set(path, listQuery);
    },
    SAVE_NOT_DIALED_PAGE: (state, { path, listQuery }) => {
      state.NotDialedPage.set(path, listQuery);
    },
    SAVE_DIAL_RECORD_PAGE: (state, { path, listQuery }) => {
      state.DialRecordPage.set(path, listQuery);
    },
    SAVE_ELEC_NOT_DIALED_PAGE: (state, { path, listQuery }) => {
      state.ElecNotDialedPage.set(path, listQuery);
    },
    SAVE_ELEC_DIAL_RECORD_PAGE: (state, { path, listQuery }) => {
      state.ElecDialRecordPage.set(path, listQuery);
    },
    SAVE_ELECTRIC_GROUP_PAGE: (state, { path, listQuery }) => {
      state.ElectricGroupPage.set(path, listQuery);
    },
    SAVE_ELEC_SALESMAN_PAGE: (state, { path, listQuery }) => {
      state.ElecSalesmanPage.set(path, listQuery);
    },
    SAVE_EXTEND_STATEMENT_PAGE: (state, { path, listQuery }) => {
      state.ExtendStatementPage.set(path, listQuery);
    },
    SAVE_COLL_STATIS_REPORT_PAGE: (state, { path, listQuery }) => {
      state.CollStatisReportPage.set(path, listQuery);
    },
    SAVE_FIN_ACCOUNT_REPORT_PAGE: (state, { path, listQuery }) => {
      state.FinAccountReportPage.set(path, listQuery);
    },
    SAVE_DOWNLOAD_PACKAGE_PAGE: (state, { path, listQuery }) => {
      state.DownloadPackagePage.set(path, listQuery);
    },
    SAVE_REFUSE_RATE_PAGE: (state, { path, listQuery }) => {
      state.RefuseRatePage.set(path, listQuery);
    },
    SAVE_FIRST_PHONE: (state, data) => {
      state.firstPhone = data;
    },
    SAVE_REVIEW_PHONE: (state, data) => {
      state.reviewPhone = data;
    },
    SAVE_END_PHONE: (state, data) => {
      state.endPhone = data;
    },
    SET_USERGROUP: (state, flag) => {
      state.userGroup = flag;
      sessionStorage.setItem('userGroup', JSON.stringify(flag));
    },
    SET_GET_REPORT_DEFINE: (state, data) => {
      state.getReportDefine = data;
      sessionStorage.setItem('getReportDefine', JSON.stringify(data));
    }
  },
  actions: {
    ToggleSideBar: ({ commit }) => {
      commit('TOGGLE_SIDEBAR')
    },
    CloseSideBar({ commit }, { withoutAnimation }) {
      commit('CLOSE_SIDEBAR', withoutAnimation)
    },
    ToggleDevice({ commit }, device) {
      commit('TOGGLE_DEVICE', device)
    },
    addVisitedViews: ({ commit }, view) => {
      commit('ADD_VISITED_VIEWS', view)
    },
    delVisitedViews({ commit, state }, view) {
      return new Promise(resolve => {
        commit('DEL_VISITED_VIEWS', view)
        resolve([...state.visitedViews])
      })
    },
    setLanguage({ commit }, language) {
      commit('SET_LANGUAGE', language)
    },
    setFirstApprDetails({ commit }, data) {
      commit('SET_FIRSTAPPRDETAILS', data)
    },
    setReviewApprDetails({ commit }, data) {
      commit('SET_REVIEWAPPRDETAILS', data)
    },
    setEndApprDetails({ commit }, data) {
      commit('SET_ENDAPPRDETAILS', data)
    },
    setApprAchiCountDetails({ commit }, data) {
      commit('SET_APPRACHICOUNTDETAILS', data)
    },
    setCustQueryDetail({ commit }, data) {
      commit('SET_CUSTQUERYDETAIL', data)
    },
    setLoanDetail({ commit }, data) {
      commit('SET_LOANDETAIL', data)
    },
    setEditGroup({ commit }, data) {
      commit('SET_EDITGROUP', data)
    },
    setCollDetail({ commit }, data) {
      commit('SET_COLLDETAIL', data)
    },
    setExpireDetail({ commit }, data) {
      commit('SET_EXPIREDETAIL', data)
    },
    setCollQueryDetail({ commit }, data) {
      commit('SET_COLLQUERYDETAIL', data)
    },
    setExtDetail({ commit }, data) {
      commit('SET_EXTDETAIL', data)
    },
    setReduDetail({ commit }, data) {
      commit('SET_REDUDETAIL', data)
    },
    setAuditDetail({ commit }, data) {
      commit('SET_AUDITDETAIL', data)
    },
    saveFirstApprPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_FIRSTAPPR_PAGE', { path, listQuery });
    },
    saveReviewApprPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_REVIEW_APPR_PAGE', { path, listQuery });
    },
    saveApprAchiPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_APPR_ACHI_COUNT_PAGE', { path, listQuery });
    },
    saveApprDispPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_APPR_DISP_PAGE', { path, listQuery });
    },
    saveEndApprPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_END_APPR_PAGE', { path, listQuery });
    },
    saveOrderPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_ORDER_PAGE', { path, listQuery });
    },
    saveOrderBanlancePage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_ORDER_BANLANCE_PAGE', { path, listQuery });
    },
    savePaymentHisPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_PAYMENT_HIS_PAGE', { path, listQuery });
    },
    saveLendersPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_LENDERS_PAGE', { path, listQuery });
    },
    saveProcessPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_PROCESS_PAGE', { path, listQuery });
    },
    saveGetCodePage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_GETCODE_PAGE', { path, listQuery });
    },
    saveGroupPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_GROUP_PAGE', { path, listQuery });
    },
    saveCollDispPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_COLL_DISP_PAGE', { path, listQuery });
    },
    saveCollAchiPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_COLL_ACHI_PAGE', { path, listQuery });
    },
    saveExtPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_EXT_PAGE', { path, listQuery });
    },
    saveCollDispatchPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_COLL_DISPATCH_PAGE', { path, listQuery });
    },
    saveOrderDivisionPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_ORDER_DIVISION_PAGE', { path, listQuery });
    },
    saveApplyPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_APPLY_PAGE', { path, listQuery });
    },
    saveAuditPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_AUDIT_PAGE', { path, listQuery });
    },
    saveCustomPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_CUSTOM_PAGE', { path, listQuery });
    },
    saveBlackPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_BLACK_PAGE', { path, listQuery });
    },
    saveAppVerPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_APP_VER_PAGE', { path, listQuery });
    },
    saveProductManagerPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_PRODUCT_MANAGER_PAGE', { path, listQuery });
    },
    saveUserGradeConfigPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_USER_GRADE_CONFIG_PAGE', { path, listQuery });
    },
    saveApprGroupPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_APPR_GROUP_PAGE', { path, listQuery });
    },
    saveRemindGroupPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_REMING_GROUP_PAGE', { path, listQuery });
    },
    saveRushGroupPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_RUSH_GROUP_PAGE', { path, listQuery });
    },
    saveRushUserPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_RUSH_USER_PAGE', { path, listQuery });
    },
    saveApprUserPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_APPR_USER_PAGE', { path, listQuery });
    },
    saveRemindUserPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_REMIND_USER_PAGE', { path, listQuery });
    },
    saveApprTotalPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_APPR_TOTAL_PAGE', { path, listQuery });
    },
    saveEndApprGroupPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_END_APPR_GROUP_PAGE', { path, listQuery });
    },
    saveEndApprUserPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_END_APPR_USER_PAGE', { path, listQuery });
    },
    saveEndApprTotalPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_END_APPR_TOTAL_PAGE', { path, listQuery });
    },
    saveRemindersPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_REMINDERS_PAGE', { path, listQuery });
    },
    saveReturnMonPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_RETURN_MON_PAGE', { path, listQuery });
    },
    saveCashloanPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_CASHLOAN_PAGE', { path, listQuery });
    },
    saveHirePurchasePage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_HIRE_PURCHASE', { path, listQuery });
    },
    saveShortMessagePage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_SHORT_MESSAGE_PAGE', { path, listQuery });
    },
    saveGamappPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_GAM_APP_PAGE', { path, listQuery });
    },
    saveFinanceReport: ({ commit }, { path, listQuery }) => {
      commit('SAVE_FINANCE_REPORT', { path, listQuery });
    },
    saveLoanDayPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_LOANDAY_PAGE', { path, listQuery });
    },
    saveLoanMonthPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_LOANMONTH_PAGE', { path, listQuery });
    },
    saveElectriPinPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_ELECTRICPIN_PAGE', { path, listQuery });
    },
    saveChannelConfigPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_CHANNELCONFIG_PAGE', { path, listQuery });
    },
    saveUrlDispatchPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_URLDISPATCH_PAGE', { path, listQuery });
    },
    saveAdChannelPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_ADCHANNEL_PAGE', { path, listQuery });
    },
    saveStatisticsPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_STATISTICS_PAGE', { path, listQuery });
    },
    saveRulesManagerPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_RULESMANAGER_PAGE', { path, listQuery });
    },
    saveModelManagerPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_MODELMANAGER_PAGE', { path, listQuery });
    },
    saveStatisticListPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_STATISTICSLIST_PAGE', { path, listQuery });
    },
    saveMessagePushPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_MESSAGEPUSH_PAGE', { path, listQuery });
    },
    saveNoticeManagerPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_NOTICEMANAGER_PAGE', { path, listQuery });
    },
    savePayChannelPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_PAY_CHANNEL_PAGE', { path, listQuery });
    },
    saveHelpCenterPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_HELPCENTER_PAGE', { path, listQuery });
    },
    saveCapitalRecoveryPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_CAPIATLRECOVERYPAGE', { path, listQuery });
    },
    saveM1AddM3Page: ({ commit }, { path, listQuery }) => {
      commit('SAVE_M1ADDM3_PAGE', { path, listQuery });
    },
    saveDPDReportPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_DPD_REPORT_PAGE', { path, listQuery });
    },
    saveLoanPlanReportPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_LOANPLAN_REPORT_PAGE', { path, listQuery });
    },
    saveOverdueDailyPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_OVERDUE_DAILY_PAGE', { path, listQuery });
    },
    saveCustVolumeDailyPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_CUST_VOLUME_DAILY_PAGE', { path, listQuery });
    },
    saveCustVolumeMonthPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_CUST_VOLUME_MONTH_PAGE', { path, listQuery });
    },
    saveOverdueCustomerListPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_OVERDUE_CUSTOMER_LIST_PAGE', { path, listQuery });
    },
    saveInOutReminderPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_INOUT_REMINDER_PAGE', { path, listQuery });
    },
    saveTripCallRecordPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_TRIP_CALL_RECORD_PAGE', { path, listQuery });
    },
    savesmsSendRecordPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_SMS_SEND_RECORD_PAGE', { path, listQuery });
    },
    savesmsSendGroupPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_SMS_SEND_GROUP_PAGE', { path, listQuery });
    },
    saveEfficiencyApprPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_EFFICIENCY_APPR_PAGE', { path, listQuery });
    },
    saveRealTimeDataPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_REAL_TIME_DATA_PAGE', { path, listQuery });
    },
    saveNotDialedPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_NOT_DIALED_PAGE', { path, listQuery });
    },
    saveDialRecordPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_DIAL_RECORD_PAGE', { path, listQuery });
    },
    saveElecNotDialedPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_ELEC_NOT_DIALED_PAGE', { path, listQuery });
    },
    saveElecDialRecordPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_ELEC_DIAL_RECORD_PAGE', { path, listQuery });
    },
    saveElectricGroupPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_ELECTRIC_GROUP_PAGE', { path, listQuery });
    },
    saveElecSalesmanPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_ELEC_SALESMAN_PAGE', { path, listQuery });
    },
    saveExtendStatementPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_EXTEND_STATEMENT_PAGE', { path, listQuery });
    },
    saveCollStatisReportPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_COLL_STATIS_REPORT_PAGE', { path, listQuery });
    },
    saveFinAccountReportPage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_FIN_ACCOUNT_REPORT_PAGE', { path, listQuery });
    },
    saveDownloadPackagePage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_DOWNLOAD_PACKAGE_PAGE', { path, listQuery });
    },
    saveRefuseRatePage: ({ commit }, { path, listQuery }) => {
      commit('SAVE_REFUSE_RATE_PAGE', { path, listQuery });
    },
    saveFirstPhone({ commit }, data) {
      commit('SAVE_FIRST_PHONE', data)
    },
    saveReviewPhone({ commit }, data) {
      commit('SAVE_REVIEW_PHONE', data)
    },
    saveEndPhone({ commit }, data) {
      commit('SAVE_END_PHONE', data)
    },
    saveUserGroup({ commit }, flag) {
      commit('SET_USERGROUP', flag)
    },
    saveGetReportDefine({ commit }, data) {
      commit('SET_GET_REPORT_DEFINE', data)
    }
  }
};

export default app;
